home *** CD-ROM | disk | FTP | other *** search
/ Aminet 7 / Aminet 7 - August 1995.iso / Aminet / comm / term / ncomm30.lha / NComm / Scripts / rxread2.ncomm < prev    next >
Text File  |  1993-05-24  |  740b  |  19 lines

  1. /* Demonstrates a second way to read serial chars via inactivity(). */
  2. /* This scripts sends all data that is received within NComm        */
  3. /* to the current CLI window. Must be executed with the RX command  */
  4.  
  5. options results /* Turn on result codes */
  6.  
  7. address 'ncomm' /* Our port name */
  8.  
  9. inactivity 2 /* Even if we didn't receive a linefeed, we will get a copy
  10.                 of the last (current) line after 2 seconds of inactivity.
  11.                 If you only want to receive a line when a linefeed is
  12.                 received, set inactivity to 0 */
  13.  
  14. do forever /* for (;;) */
  15.    wait '0A'X /* Wait for next line */
  16.    if RC == 20 then exit /* Exit if user selected Quit NComm */
  17.    say result /* Write line to CLI window */
  18. end
  19.